
var aArray = new Array( 4 );


for( var i = 0; i < aArray.length; i = i + 1 )
{
	aArray[ i ] = 0;
}



function Saudi()
{
	aArray[ 0 ] = aArray[ 0 ] + 1;
	document.getElementById( "picture" ).src = "images/s1.jpg";
	document.getElementById( "pic" ).src = "images/s2.jpg";
	document.getElementById( "picture" ).alt = "Saudi";	
	document.getElementById( "picture" ).title = "Saudi Flag";				
	document.getElementById( "pic" ).alt = "Saudi";	
	document.getElementById( "pic" ).title = "Kingdom Tower";
	document.getElementById( "p" ).innerHTML = "Saudi Arabia is located in the Middle East.It was founded by Abdul-Aziz bin Saud in 1932. Saudi Arabia  is the largest oil exporter in the world. Also,It possesses about 20% of the world's proven petroleum reserves,, and plays a leading role in OPEC.";
}

function Japan()
{
	
	aArray[ 1 ] = aArray[ 1 ] + 1;
	document.getElementById( "picture" ).src = "images/j1.jpg";
	document.getElementById( "pic" ).src = "images/j2.jpg";
	document.getElementById( "picture" ).alt = "Japan";	
	document.getElementById( "picture" ).title = "Japanese Flag";				
	document.getElementById( "pic" ).alt = "Japan";	
	document.getElementById( "pic" ).title = "Japan";
	document.getElementById( "p" ).innerHTML ="Japan is an island nation in East Asia which located in the Pacific Ocean. Japan is an archipelago of 6,852 islands. The four largest islands are Honshu, Hokkaido, Kyushu and Shikoku.Japan is one of the most developed countries."
}
function China()
{
	aArray[ 2 ] = aArray[ 2 ] + 1;
	document.getElementById( "picture" ).src = "images/c1.jpg";
	document.getElementById( "pic" ).src = "images/c2.jpg";
	document.getElementById( "picture" ).alt = "China";	
	document.getElementById( "picture" ).title = "Chinese Flag";				
	document.getElementById( "pic" ).alt = "China";	
	document.getElementById( "pic" ).title = "Great Wall of China";
	document.getElementById( "p" ).innerHTML ="China is one of the four oldest civilizations in the world with nearly 4,000 years of continuous history and boasts rich cultural relics and historical sites. With just over 1.3 billion people China is the world's most populous country."
}

function Malaysia()
{
	
	aArray[ 3 ] = aArray[ 3 ] + 1;
	document.getElementById( "picture" ).src = "images/m2.jpg";
	document.getElementById( "pic" ).src = "images/m1.jpg";
	document.getElementById( "picture" ).alt = "Malaysia ";	
	document.getElementById( "picture" ).title = "Malaysia Flag";				
	document.getElementById( "pic" ).alt = "Malaysia";	
	document.getElementById( "pic" ).title = "Petronas Twin Towers";
	document.getElementById( "p" ).innerHTML ="Malaysia is located in Southeast Asia. It consists of thirteen states and three federal territories. It is one of the most tourist countries in the world in terms of its nature."
}
function Counter()
{
	
	if( aArray[ 0 ] > 0 && aArray[ 1 ] > 0 && aArray[ 2 ] > 0 
			&& aArray[ 3 ] > 0  )
	{
		
		window.location = "congratulations.html"	;
	}
	else
	{
		alert( "The course is incomplete" );
	}
}
